package com.example.demo.PrototypeMode;

import lombok.Data;

/**
 * 邮件类
 */
@Data
public class Mail implements Cloneable{

    //收件人
    private String receiver;
    //邮件名称
    private String subject;
    //称谓
    private String appellation;
    //邮件内容
    private String contxt;
    //邮件的尾部，一般都是加上"XXX版权所有"等信息
    private String tail;

    @Override
    public Mail clone(){
        Mail mail =null;
        try {
            mail = (Mail)super.clone();
        } catch (CloneNotSupportedException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return mail;
    }
    public Mail(AdvTemplate advTemplate){
        this.contxt = advTemplate.getAdvContent();
        this.subject = advTemplate.getAdvSubject();
    }
}
